import React from 'react'


export default class Left extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      list: [
        {
          name: 'aaaa',
          value: 111
        }, {
          name: 'bbbb',
          value: 222
        }, {
          name: 'cccc',
          value: 333
        }, {
          name: 'dddd',
          value: 444
        }
      ]
    }
    this.textRef = React.createRef()
  }
  
  // static contextType = contColor;

  componentDidMount() {
    // this.textRef.current.classList.add('active')
    console.log(this.context, 'context')
  }

  render() {
    return (
      // <div className="left">
      this.state.list.map((item, index) => (
        <React.Fragment key={index}>
          <span>
          {item.name}
          </span>
          <div>
            {item.value}
          </div>
          <div>
            {index}
          </div>
        </React.Fragment>
      ))
      // </div>
    )
  }
}